package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import flc.ast.R;
import flc.ast.activity.AlbumChooseActivity;
import flc.ast.databinding.FragmentEditBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link EditFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class EditFragment extends BaseNoModelFragment<FragmentEditBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_edit;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.ivPicHandle.setOnClickListener(this);
        mDataBinding.ivPicBeauty.setOnClickListener(this);
        mDataBinding.ivPicText.setOnClickListener(this);
        mDataBinding.ivPicFilter.setOnClickListener(this);
        mDataBinding.ivPicSticker.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.ivPicHandle://图片扣像
                AlbumChooseActivity.type=1;
                startActivity(AlbumChooseActivity.class);
                break;
            case R.id.ivPicBeauty://图片美颜
                AlbumChooseActivity.type=2;
                startActivity(AlbumChooseActivity.class);
                break;
            case R.id.ivPicText://图片文字
                AlbumChooseActivity.type=3;
                startActivity(AlbumChooseActivity.class);
                break;
            case R.id.ivPicFilter://图片滤镜
                AlbumChooseActivity.type=4;
                startActivity(AlbumChooseActivity.class);
                break;
            case R.id.ivPicSticker://图片贴纸
                AlbumChooseActivity.type=5;
                startActivity(AlbumChooseActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}